home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 14.4 KB | 518 lines | [TEXT/MPS ] |
- ;
- ; File: AppleTalk.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
- __APPLETALK__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
- include 'OSUtils.a'
- ENDIF
- ; include 'MixedMode.a' ;
- ; include 'Memory.a' ;
-
- ; Driver unit and reference numbers (ADSP is dynamic)
- mppUnitNum EQU 9 ; MPP unit number
- atpUnitNum EQU 10 ; ATP unit number
- xppUnitNum EQU 40 ; XPP unit number
- mppRefNum EQU -10 ; MPP reference number
- atpRefNum EQU -11 ; ATP reference number
- xppRefNum EQU -41 ; XPP reference number
- ; .MPP csCodes
- lookupReply EQU 242 ; This command queued to ourself
- writeLAP EQU 243 ; Write out LAP packet
- detachPH EQU 244 ; Detach LAP protocol handler
- attachPH EQU 245 ; Attach LAP protocol handler
- writeDDP EQU 246 ; Write out DDP packet
- closeSkt EQU 247 ; Close DDP socket
- openSkt EQU 248 ; Open DDP socket
- loadNBP EQU 249 ; Load NBP command-executing code
- lastResident EQU 249 ; Last resident command
- confirmName EQU 250 ; Confirm name
- lookupName EQU 251 ; Look up name on internet
- removeName EQU 252 ; Remove name from Names Table
- registerName EQU 253 ; Register name in Names Table
- killNBP EQU 254 ; Kill outstanding NBP request
-
- unloadNBP EQU 255 ; Unload NBP command code
- setSelfSend EQU 256 ; MPP: Set to allow writes to self
- SetMyZone EQU 257 ; Set my zone name
- GetATalkInfo EQU 258 ; get AppleTalk information
- ATalkClosePrep EQU 259 ; AppleTalk close query
- ; .ATP csCodes
- nSendRequest EQU 248 ; NSendRequest code
- relRspCB EQU 249 ; Release RspCB
- closeATPSkt EQU 250 ; Close ATP socket
- addResponse EQU 251 ; Add response code | Require open skt
- sendResponse EQU 252 ; Send response code
- getRequest EQU 253 ; Get request code
- openATPSkt EQU 254 ; Open ATP socket
- sendRequest EQU 255 ; Send request code
- relTCB EQU 256 ; Release TCB
- killGetReq EQU 257 ; Kill GetRequest
- killSendReq EQU 258 ; Kill SendRequest
- killAllGetReq EQU 259 ; Kill all getRequests for a skt
- ; .XPP csCodes
- openSess EQU 255 ; Open session
- closeSess EQU 254 ; Close session
- userCommand EQU 253 ; User command
-
- userWrite EQU 252 ; User write
- getStatus EQU 251 ; Get status
- afpCall EQU 250 ; AFP command (buffer has command code)
- getParms EQU 249 ; Get parameters
- abortOS EQU 248 ; Abort open session request
- closeAll EQU 247 ; Close all open sessions
- xCall EQU 246 ; .XPP extended calls
- ; Transition Queue transition types
- ATTransOpen EQU 0 ;AppleTalk has opened
- ATTransClose EQU 2 ;AppleTalk is about to close
- ATTransClosePrep EQU 3 ;Is it OK to close AppleTalk ?
- ATTransCancelClose EQU 4 ;Cancel the ClosePrep transition
- afpByteRangeLock EQU 1 ;AFPCall command codes
- afpVolClose EQU 2 ;AFPCall command codes
- afpDirClose EQU 3 ;AFPCall command codes
- afpForkClose EQU 4 ;AFPCall command codes
- afpCopyFile EQU 5 ;AFPCall command codes
- afpDirCreate EQU 6 ;AFPCall command codes
- afpFileCreate EQU 7 ;AFPCall command codes
- afpDelete EQU 8 ;AFPCall command codes
- afpEnumerate EQU 9 ;AFPCall command codes
-
- afpFlush EQU 10 ;AFPCall command codes
- afpForkFlush EQU 11 ;AFPCall command codes
- afpGetDirParms EQU 12 ;AFPCall command codes
- afpGetFileParms EQU 13 ;AFPCall command codes
- afpGetForkParms EQU 14 ;AFPCall command codes
- afpGetSInfo EQU 15 ;AFPCall command codes
- afpGetSParms EQU 16 ;AFPCall command codes
- afpGetVolParms EQU 17 ;AFPCall command codes
- afpLogin EQU 18 ;AFPCall command codes
- afpContLogin EQU 19 ;AFPCall command codes
- afpLogout EQU 20 ;AFPCall command codes
- afpMapID EQU 21 ;AFPCall command codes
- afpMapName EQU 22 ;AFPCall command codes
- afpMove EQU 23 ;AFPCall command codes
- afpOpenVol EQU 24 ;AFPCall command codes
- afpOpenDir EQU 25 ;AFPCall command codes
- afpOpenFork EQU 26 ;AFPCall command codes
- afpRead EQU 27 ;AFPCall command codes
- afpRename EQU 28 ;AFPCall command codes
- afpSetDirParms EQU 29 ;AFPCall command codes
-
- afpSetFileParms EQU 30 ;AFPCall command codes
- afpSetForkParms EQU 31 ;AFPCall command codes
- afpSetVolParms EQU 32 ;AFPCall command codes
- afpWrite EQU 33 ;AFPCall command codes
- afpGetFlDrParms EQU 34 ;AFPCall command codes
- afpSetFlDrParms EQU 35 ;AFPCall command codes
- afpDTOpen EQU 48 ;AFPCall command codes
- afpDTClose EQU 49 ;AFPCall command codes
- afpGetIcon EQU 51 ;AFPCall command codes
- afpGtIcnInfo EQU 52 ;AFPCall command codes
- afpAddAPPL EQU 53 ;AFPCall command codes
- afpRmvAPPL EQU 54 ;AFPCall command codes
- afpGetAPPL EQU 55 ;AFPCall command codes
- afpAddCmt EQU 56 ;AFPCall command codes
- afpRmvCmt EQU 57 ;AFPCall command codes
- afpGetCmt EQU 58 ;AFPCall command codes
- afpAddIcon EQU 192 ;Special code for ASP Write commands
- xppLoadedBit EQU 5 ; XPP bit in PortBUse
- scbMemSize EQU 192 ; Size of memory for SCB
- xppFlagClr EQU 0 ; Cs for AFPCommandBlock
-
- xppFlagSet EQU 128 ; StartEndFlag & NewLineFlag fields.
- lapSize EQU 20
- ddpSize EQU 26
- nbpSize EQU 26
- atpSize EQU 56
- atpXOvalue EQU 32 ;ATP exactly-once bit
- atpEOMvalue EQU 16 ;ATP End-Of-Message bit
- atpSTSvalue EQU 8 ;ATP Send-Transmission-Status bit
- atpTIDValidvalue EQU 2 ;ATP trans. ID valid bit
- atpSendChkvalue EQU 1 ;ATP send checksum bit
- zipGetLocalZones EQU 5
- zipGetZoneList EQU 6
- zipGetMyZone EQU 7
- LAPMgrPtr EQU $B18 ;Entry point for LAP Manager
- LAPMgrCall EQU 2 ;Offset to LAP routines
- LAddAEQ EQU 23 ;LAPAddATQ routine selector
- LRmvAEQ EQU 24 ;LAPRmvATQ routine selector
-
- tLAPRead EQU 0
- tLAPWrite EQU 1
- tDDPRead EQU 2
- tDDPWrite EQU 3
- tNBPLookup EQU 4
- tNBPConfirm EQU 5
- tNBPRegister EQU 6
- tATPSndRequest EQU 7
- tATPGetRequest EQU 8
- tATPSdRsp EQU 9
- tATPAddRsp EQU 10
- tATPRequest EQU 11
- tATPResponse EQU 12
-
- lapProto EQU 0
- ddpProto EQU 1
- nbpProto EQU 2
- atpProto EQU 3
-
- LAPAdrBlock RECORD 0
- dstNodeID ds.b 1
- srcNodeID ds.b 1
- lapProtType ds.b 1
- filler ds.b 1 ; Filler for proper byte alignment
- sizeof EQU 4
- ENDR
-
- ATQEntry RECORD 0
- qLink ds.l 1 ;next queue entry
- qType ds.w 1 ;queue type
- CallAddr ds.l 1 ;your routine descriptor
- sizeof EQU 10
- ENDR
-
- AddrBlock RECORD 0
- aNet ds.w 1
- aNode ds.b 1
- aSocket ds.b 1
- sizeof EQU 4
- ENDR
-
- ; Real definition of EntityName is 3 PACKED strings of any length (32 is just an example). No
- ;offests for Asm since each String address must be calculated by adding length byte to last string ptr.
- ;In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte unless they are
- ;only a byte long. So this will generate correct looking interfaces for Pascal and C, but they will not
- ;be the same, which is OK since they are not used.
- EntityName RECORD 0
- objStr ds.b 33
- pad1 ds.b 1 ;Str32's aligned on even word boundries.
- typeStr ds.b 33
- pad2 ds.b 1
- zoneStr ds.b 33
- pad3 ds.b 1
- sizeof EQU 102
- ENDR
-
- RetransType RECORD 0
- retransInterval ds.b 1
- retransCount ds.b 1
- sizeof EQU 2
- ENDR
-
- BDSElement RECORD 0
- buffSize ds.w 1
- buffPtr ds.l 1
- dataSize ds.w 1
- userBytes ds.l 1
- sizeof EQU 12
- ENDR
-
- ATLAPRec RECORD 0
- abOpcode ds.b 1
- filler ds.b 1 ; Filler for proper byte alignment
- abResult ds.w 1
- abUserReference ds.l 1
- lapAddress ds LAPAdrBlock
- lapReqCount ds.w 1
- lapActCount ds.w 1
- lapDataPtr ds.l 1
- sizeof EQU 20
- ENDR
-
- ATDDPRec RECORD 0
- abOpcode ds.b 1
- filler ds.b 1 ; Filler for proper byte alignment
- abResult ds.w 1
- abUserReference ds.l 1
- ddpType ds.w 1
- ddpSocket ds.w 1
- ddpAddress ds AddrBlock
- ddpReqCount ds.w 1
- ddpActCount ds.w 1
- ddpDataPtr ds.l 1
- ddpNodeID ds.w 1
- sizeof EQU 26
- ENDR
-
- ATNBPRec RECORD 0
- abOpcode ds.b 1
- filler ds.b 1 ; Filler for proper byte alignment
- abResult ds.w 1
- abUserReference ds.l 1
- nbpEntityPtr ds.l 1
- nbpBufPtr ds.l 1
- nbpBufSize ds.w 1
- nbpDataField ds.w 1
- nbpAddress ds AddrBlock
- nbpRetransmitInfo ds RetransType
- sizeof EQU 26
- ENDR
-
- ATATPRec RECORD 0
- abOpcode ds.b 1
- filler1 ds.b 1 ; Filler for proper byte alignment
- abResult ds.w 1
- abUserReference ds.l 1
- atpSocket ds.w 1
- atpAddress ds AddrBlock
- atpReqCount ds.w 1
- atpDataPtr ds.l 1
- atpRspBDSPtr ds.l 1
- atpBitMap ds.b 1
- filler2 ds.b 1 ; Filler for proper byte alignment
- atpTransID ds.w 1
- atpActCount ds.w 1
- atpUserData ds.l 1
- atpXO ds.b 1
- atpEOM ds.b 1
- atpTimeOut ds.w 1
- atpRetries ds.w 1
- atpNumBufs ds.w 1
- atpNumRsp ds.w 1
- atpBDSSize ds.w 1
- atpRspUData ds.l 1
- atpRspBuf ds.l 1
- atpRspSize ds.w 1
- sizeof EQU 56
- ENDR
-
- AFPCommandBlock RECORD 0
- cmdByte ds.b 1
- startEndFlag ds.b 1
- forkRefNum ds.w 1
- rwOffset ds.l 1
- reqCount ds.l 1
- newLineFlag ds.b 1
- newLineChar ds.b 1
- sizeof EQU 14
- ENDR
-
- WDSElement RECORD 0
- entryLength ds.w 1
- entryPtr ds.l 1
- sizeof EQU 6
- ENDR
-
- NTElement RECORD 0
- nteAddress ds AddrBlock ;network address of entity
- filler ds.b 1
- entityData ds.b 99 ;Object, Type & Zone
- sizeof EQU 104
- ENDR
-
- NamesTableEntry RECORD 0
- qNext ds.l 1 ;ptr to next NTE
- nt ds NTElement
- sizeof EQU 108
- ENDR
-
- MPPParamBlock RECORD 0
- qLink ds.l 1
- qType ds.w 1
- ioTrap ds.w 1
- ioCmdAddr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- userData ds.l 1
- reqTID ds.w 1
- ioRefNum ds.w 1
- csCode ds.w 1
- VariantLevel0Begin EQU *
- filler0 ds.w 1
- wdsPointer ds.l 1
-
- ORG VariantLevel0Begin
- protType ds.b 1
- filler ds.b 1
- handler ds.l 1
-
- ORG VariantLevel0Begin
- socket ds.b 1
- checksumFlag ds.b 1
- listener ds.l 1
-
- ORG VariantLevel0Begin
- interval ds.b 1 ;retry interval
- count ds.b 1 ;retry count
- nbpPtrs ds.l 1
- VariantLevel1Begin EQU *
- verifyFlag ds.b 1
- filler3 ds.b 1
-
- ORG VariantLevel1Begin
- retBuffPtr ds.l 1
- retBuffSize ds.w 1
- maxToGet ds.w 1
- numGotten ds.w 1
-
- ORG VariantLevel1Begin
- confirmAddr ds AddrBlock
- newSocket ds.b 1
- filler4 ds.b 1
-
-
- ORG VariantLevel0Begin
- newSelfFlag ds.b 1 ;self-send toggle flag
- oldSelfFlag ds.b 1 ;previous self-send state
-
- ORG VariantLevel0Begin
- nKillQEl ds.l 1 ;ptr to i/o queue element to cancel
-
- ORG VariantLevel0Begin
- version ds.w 1
- varsPtr ds.l 1
- DCEPtr ds.l 1
- portID ds.w 1
- configuration ds.l 1
- selfSend ds.w 1
- netLo ds.w 1
- netHi ds.w 1
- ourAdd ds.l 1
- routerAddr ds.l 1
- numOfPHs ds.w 1
- numOfSkts ds.w 1
- numNBPEs ds.w 1
- nTQueue ds.l 1
- LAlength ds.w 1
- linkAddr ds.l 1
- zoneName ds.l 1
-
- ORG VariantLevel0Begin
- appName ds.l 1 ;pointer to application name in buffer
-
- sizeof EQU 78
- ENDR
-
- XPPParamBlock RECORD 0
- qLink ds.l 1
- qType ds.w 1
- ioTrap ds.w 1
- ioCmdAddr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- cmdResult ds.l 1
- ioVRefNum ds.w 1
- ioRefNum ds.w 1
- csCode ds.w 1
- VariantLevel0Begin EQU *
- abortSCBPtr ds.l 1 ; SCB pointer for AbortOS
-
- ORG VariantLevel0Begin
- aspMaxCmdSize ds.w 1
- aspQuantumSize ds.w 1
- numSesss ds.w 1
-
- ORG VariantLevel0Begin
- sessRefnum ds.w 1
- aspTimeout ds.b 1
- aspRetry ds.b 1
- VariantLevel1Begin EQU *
- serverAddr ds AddrBlock
- scbPointer ds.l 1
- attnRoutine ds.l 1
-
- ORG VariantLevel1Begin
- cbSize ds.w 1
- cbPtr ds.l 1
- rbSize ds.w 1
- rbPtr ds.l 1
- VariantLevel2Begin EQU *
- afpAddrBlock ds AddrBlock
- afpSCBPtr ds.l 1
- afpAttnRoutine ds.l 1
-
- ORG VariantLevel2Begin
- wdSize ds.w 1
- wdPtr ds.l 1
- ccbStart ds.b 296
-
-
-
- ORG VariantLevel0Begin
- xppSubCode ds.w 1
- xppTimeout ds.b 1
- xppRetry ds.b 1
- filler1 ds.w 1
- zipBuffPtr ds.l 1
- zipNumZones ds.w 1
- zipLastFlag ds.b 1
- filler2 ds.b 1
- zipInfoField ds.b 70
-
- sizeof EQU 346
- ENDR
-
- ATPParamBlock RECORD 0
- qLink ds.l 1
- qType ds.w 1
- ioTrap ds.w 1
- ioCmdAddr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- userData ds.l 1
- reqTID ds.w 1
- ioRefNum ds.w 1
- csCode ds.w 1
- atpSocket ds.b 1
- atpFlags ds.b 1
- addrBlock ds AddrBlock
- reqLength ds.w 1
- reqPointer ds.l 1
- bdsPointer ds.l 1
- VariantLevel0Begin EQU *
- numOfBuffs ds.b 1
- timeOutVal ds.b 1
- numOfResps ds.b 1
- retryCount ds.b 1
- intBuff ds.w 1
- TRelTime ds.b 1
- filler0 ds.b 1
-
- ORG VariantLevel0Begin
- filler ds.b 1
- bdsSize ds.b 1
- transID ds.w 1
-
- ORG VariantLevel0Begin
- bitMap ds.b 1
- filler2 ds.b 1
-
- ORG VariantLevel0Begin
- rspNum ds.b 1
- filler3 ds.b 1
-
- ORG VariantLevel0Begin
- aKillQEl ds.l 1
-
- sizeof EQU 52
- ENDR
-
- ;
- ; The following routines are obsolete and will not be supported on
- ; PowerPC. Equivalent functionality is provided by the routines
- ; above.
- ;
- IF OLDROUTINENAMES ** ¬ GENERATINGCFM THEN
- ENDIF
- ENDIF ; __APPLETALK__
-